package com.hyc.Servlet;

import com.hyc.service.helloservice;
import com.hyc.service.impl.helloServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @projectName: SpringIOC
 * @package: com.hyc
 * @className: helloservlet
 * @author: 冷环渊 doomwatcher
 * @description: TODOo
 * @date: 2022/3/24 15:51
 * @version: 1.0
 */
@WebServlet("/hello")
public class helloservlet extends HttpServlet {

    helloservice helloservice = new helloServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().write("spring" + helloservice.findAll());
    }
}
